package com.qf.smartplatform.controller;

import com.qf.smartplatform.dto.Result;
import com.qf.smartplatform.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * projectName:day12_27_Test
 * author:guoLei
 * time:2022/1/9 17:56
 * description:
 */
@RestController
@RequestMapping("/menus")
public class MenuController {
    private MenuService menuService;
@Autowired
    public void setMenuService(MenuService menuService) {
        this.menuService = menuService;
    }
    @PostMapping("/menu/enable")
    public Result updateEnable(String enbale, String menuId){
    menuService.updateMenuEnable(enbale,menuId);
    return Result.setOK();
    }
}
